﻿using System.Web.Mvc;
using Abp.Web.Mvc.Authorization;
using FutureApp.Authorization;
using FutureApp.MultiTenancy;

namespace FutureApp.Web.Controllers
{
    [AbpMvcAuthorize(PermissionNames.Pages_Tenants)]
    public class TenantsController : FutureAppControllerBase
    {
        public ITenantAppService TenantAppService { get; set; }

        public ActionResult List()
        {
            var output = this.TenantAppService.GetTenants();
            return this.View(output);
        }

        public ActionResult Add()
        {
            return this.View();
        }

        public ActionResult Edit(int id)
        {
            var output = this.TenantAppService.GetTenant(id);
            return this.View(output);
        }
    }
}